package com.frontier.common;

import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 分页请求对象
 *
 * @author YLS-XuXu
 * @time 2021/8/7
 */
@Data
public class PageRequest<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 页码
     */
    @NotNull(message = "页码不能为空")
    private Integer pageNum;

    /**
     * 每页数据量
     */
    @NotNull(message = "每页数量不能为空")
    private Integer pageSize;

    /**
     * 数据
     */
    @Valid
    private T data;

}
